/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package idea.editor.property.bigint;


import java.beans.PropertyEditorSupport;
import java.math.BigInteger;


/**
 *
 * @author rejun001
 */
public class BigIntegerPropertyEditor extends PropertyEditorSupport
{


    @Override
    public String getAsText()
    {
        BigInteger bd = (BigInteger) getValue();
        if ( bd == null )
        {
            return "No Data Set";
        }
        return bd.toString();
    }


    @Override
    public void setAsText( String text ) throws IllegalArgumentException
    {
        setValue( new BigInteger( text ) );
    }
    
}
